﻿Public Class CompanyPanel
    Inherits System.Windows.Forms.Panel

    Public Sub New(ByVal company As Company)
        BorderStyle = BorderStyle.Fixed3D
        Name = "CompanyPanel"
        Size = New System.Drawing.Size(250, 130)
        TabIndex = 4
        addProjectProcessList(company.getProcessItemList())
    End Sub

    Public Sub addProjectProcessList(ByVal processItemList As List(Of ProcessItem))
        Dim verticalOffset = 10
        For Each processItem In processItemList
            Dim statusObserver As ProcessItemStatusView = New ProcessItemStatusView(processItem, Me, New Point(10, verticalOffset))
            verticalOffset = verticalOffset + 30
        Next
    End Sub

    Private Function createProgressBar() As ProgressBar
        Dim progressBar = New ProgressBar()
        Controls.Add(progressBar)
        progressBar.Size = New System.Drawing.Size(50, 20)
        Return progressBar
    End Function
End Class
